<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <mate name="viewport" content="width=device-width,initial-scale=1.0"></mate>
    <title>博客发布</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/lib/editormd/css/editormd.min.css">
    <link rel="stylesheet" href="../static/css/me.css">

</head>
<body>

    <!--导航-->
    <nav class="ui inverted attached segment m-padded-tb-small m-shadow-small"><!--inverted 把白色转换成黑色 attached 使nav标签附着在浏览器边缘-->
        <div class="ui container"><!--容器-->
            <div class="ui inverted stackable menu"><!--菜单栏 stackable:可堆叠适应于手机端-->
                <h2 class="ui teal header m-padded-t-small">管理后台</h2>
                <a href="#" class="m-item item m-mobile-hide"><i class="home icon"></i>首页</a><!-- m-mobile-hide：手机端隐藏-->
                <a href="#" class="m-item item m-mobile-hide"><i class="idea icon"></i>分类</a>
                <a href="#" class="m-item item m-mobile-hide"><i class="tags icon"></i>标签</a>
                <div class="right m-item m-mobile-hide menu">
                    <div class="ui dropdown item">
                        <div class="text">
                            <img class="ui avatar image" src="https://picsum.photos/id/1005/100/100">
                            许豪杰
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a href="#" class="item">注销</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle button black icon m-right-top m-mobile-show"><!--导航列表按钮menu toggle:指示标记方便JavaScript获取该标签-->
            <i class="sidebar icon"></i>
        </a>
    </nav>

    <div class="ui attached pointing menu">
        <div class="ui container">
            <div class="right menu">
                <a href="#" class="active item">发布</a>
                <a href="#" class="teal item">列表</a>
            </div>
        </div>
    </div>

    <!--中间内容-->
    <div class="m-container-small m-padded-tb-big">
        <div class="ui container">
            <form action="#" method="post" class="ui form">

                <div class="required field">
                    <div class="ui left labeled input">
                        <!--selection dropdown下拉选择 compact适应文本-->
                        <div class="ui selection compact teal basic dropdown label">
                            <input type="hidden" value="原创">
                            <i class="dropdown icon"></i>
                            <div class="default text">原创</div>
                            <div class="menu">
                                <div class="item" data-value="原创">原创</div>
                                <div class="item" data-value="转载">转载</div>
                                <div class="item" data-value="翻译">翻译</div>
                            </div>
                        </div>
                        <input type="text" placeholder="标题" name="title">
                    </div>
                </div>

                <div class="field">
                    <div id="md-content" style="z-index: 1!important;"><!--style="z-index: 1!important;显示在最上层-->
                        <textarea placeholder="博客内容" name="content" style="display: none">
                            [TOC]

#### Disabled options

- TeX (Based on KaTeX);
- Emoji;
- Task lists;
- HTML tags decode;
- Flowchart and Sequence Diagram;
                        </textarea>
                    </div>
                </div>

                <div class="two fields">

                    <div class="field">
                        <div class="ui left labeled action input"><!--action消除圆角-->
                            <label class="ui compact teal basic label">分类</label>
                            <div class="ui fluid selection dropdown"><!--fluid充满宽度-->
                                <input type="hidden" name="type">
                                <i class="dropdown icon"></i>
                                <div class="default text">分类</div>
                                <div class="menu">
                                    <div class="item" data-value="1">错误日志</div>
                                    <div class="item" data-value="2">开发者手册</div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="field">
                        <div class="ui left labeled action input"><!--action消除圆角-->
                            <label class="ui compact teal basic label">标签</label>
                            <div class="ui fluid multiple search selection dropdown"><!--multiple多选 search可以搜索-->
                                <input type="hidden" name="tag">
                                <i class="dropdown icon"></i>
                                <div class="default text">分类</div>
                                <div class="menu">
                                    <div class="item" data-value="1">Java</div>
                                    <div class="item" data-value="2">JavaScript</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="field">
                    <div class="ui left labeled input">
                        <label class="ui teal basic label">首图</label>
                        <input type="text" name="indexPicture" placeholder="首图引用地址">
                    </div>
                </div>

                <div class="inline fields">
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="recommend" name="recommend" checked class="hidden">
                            <label for="recommend">推荐</label>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="shareInfo" name="shareinfo" class="hidden">
                            <label for="shareInfo">转载</label>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="appreciation" name="appreciation" class="hidden">
                            <label for="appreciation">赞赏</label>
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui checkbox">
                            <input type="checkbox" id="comment" name="comment" class="hidden">
                            <label for="comment">评论</label>
                        </div>
                    </div>
                </div>

                <div class="ui error message"></div><!--反馈错误信息-->

                <div class="ui right aligned container">
                    <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button> <!--onclick="window.history.go(-1):返回上一个页面-->
                    <button class="ui secondary button">保存</button>
                    <button class="ui teal button">发布</button>
                </div>

            </form>
        </div>
    </div>

    <!--底部footer-->
    <footer class="ui inverted vertical attached segment m-padded-tb-massive">
        <div class="ui center aligned container"><!--center aligned居中-->
            <div class="ui inverted divided stackable grid"><!--获取16份容器-->
                <div class="three wide column"><!--获取3份容器 微信二维码-->
                    <div class="ui inverted link list">
                        <div class="item">
                            <img src="../static/images/wechat.jpg" class="ui rounded image" alt="" style="width:100px"><!--ui rounded image圆角图片-->
                        </div>
                    </div>
                </div>
                <div class="three wide column"><!--获取3份容器 最新博客-->
                    <div class="ui inverted link list">
                        <h4 class="ui inverted header m-opacity-mini">最新博客</h4>
                        <a href="#" class="item">用户故事（User Story）</a>
                        <a href="#" class="item">关于刻意练习的清单</a>
                        <a href="#" class="item">失败要趁早</a>
                    </div>
                </div>
                <div class="three wide column"><!--获取3份容器 联系我-->
                    <div class="ui inverted link list">
                        <h4 class="ui inverted header m-opacity-mini">联系我</h4>
                        <a href="#" class="item">Email：1812569943@qq.com</a>
                        <a href="#" class="item">QQ:1812569943</a>
                        <a href="#" class="item">Phone:18606753520</a>
                    </div>
                </div>
                <div class="seven wide column"><!--获取7份容器 Blog-->
                    <h4 class="ui inverted header m-opacity-mini">Blog</h4>
                    <p class="m-opacity-mini">这是我的个人博客、会分享关于编程写作、思考相关的任何内容希望可以给来这的人有所帮助...</p>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text m-opacity-tiny m-text-thin m-text-space">Copyright © 2022 -2023 Xuhaojie Designed by Xuhaojie </p>
        </div>
    </footer>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script><!--通过CND的方式获取ui图片-->
<script src="../static/lib/editormd/editormd.min.js"></script>


<script>

    //初始化markdown编辑器
    var contentEditor;
    $(function() {
        contentEditor = editormd("md-content", {
            width   : "100%",
            height  : 640,
            syncScrolling : "single",
            path    : "../static/lib/editormd/lib/"
        });
    });

    $('.menu.toggle').click(function (){
       $('.m-item').toggleClass('m-mobile-hide')
    });<!--类似开关样式单击切换-->

    $('.ui.dropdown').dropdown({
        on:'hover'
    });

    $('.ui.form').form({
        fields :{
            title :{
                identidier:'title',
                rules:[{
                    type:'empty',
                    prompt:'标题：请输入博客标题'
                }]
            }
        }
    });
</script>
</body>
</html>
